﻿<%@ Page EnableEventValidation="false" Language="C#" MasterPageFile="~/Master.Master" AutoEventWireup="true" CodeBehind="EduLevel.aspx.cs" Inherits="CourseBook.EduLevel" %>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <script src="Content/Js/jquery.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function(){
            // Form Validation
            $("#basic_validate").validate({
                rules: {
                    <%=txtName.UniqueID %>:{
			            required: true
			        },
                    <%=txtShortName.UniqueID %>:{
                        required:true
                    },
                    <%=txtNote.UniqueID %>:{
                        required:true
                    }
                },
                errorClass: "help-inline",
                errorElement: "span",
                highlight:function(element, errorClass, validClass) {
                    $(element).parents('.control-group').addClass('error');
                },
                unhighlight: function(element, errorClass, validClass) {
                    $(element).parents('.control-group').removeClass('error');
                    $(element).parents('.control-group').addClass('success');
                }
    });
});
    </script>

    <div id="content">
        <div class="container-fluid">
            <div class="row-fluid">
                <div class="span12">
                    <div class="widget-box">
                        <div class="widget-title">
							<span class="icon">
								<i class="icon-align-justify"><asp:Image ImageUrl="~/Content/Image/Home-icon.png" runat="server" /></i>									
							</span>
							<h5>EduLevel</h5>
						</div>
                        <div class="widget-content nopadding" >
                            <form class="form-horizontal" method="post" action="#" runat="server" id="basic_validate" novalidate="no novalidate">
                                <div class="control-group">
                                    <asp:Label runat="server" class="control-label" Text="<%$Resources:lblName %>"></asp:Label>
                                    <div class="controls">
                                        <asp:TextBox name="txtName" ID="txtName" runat="server"></asp:TextBox>
                                    </div>
                                </div>
                                <div class="control-group">
                                    <asp:Label runat="server" class="control-label" Text="<%$Resources:lblShortName %>"></asp:Label>
                                    <div class="controls">
                                        <asp:TextBox runat="server" name="txtShortName" ID="txtShortName"></asp:TextBox>
                                    </div>
                                </div>
                                <div class="control-group">
                                    <asp:Label runat="server" class="control-label" Text="<%$Resources:lblNote %>"></asp:Label>
                                    <div class="controls">
                                        <asp:TextBox runat="server" ID="txtNote" name="txtkhoa" TextMode="MultiLine"></asp:TextBox>
                                    </div>
                                </div>
                                <div class="form-actions">
                                    <asp:Button runat="server" Text="<%$Resources:btAddNew%>" ID="nhap" OnClick="nhap_click" CssClass="btn btn-primary" />
                                    <asp:Button runat="server" Text="<%$Resources:btSave%>" ID="sua" OnClick="sua_click" CssClass="btn btn-primary" Enabled="false" />
                                    <asp:Button runat="server" Text="<%$Resources:btnRefresh%>" ID="btnRefresh" OnClick="refresh_click" CssClass="btn btn-primary" />
                                    <asp:Button runat="server" Text="<%$Resources:btCancel %>" ID="btCancel" OnClick="Cancel_click" CssClass="btn btn-primary"  />
                                </div>
                            </form>
                        </div>
                        <asp:gridview id="gvEduLevel" runat="server" autogeneratecolumns="False" 
                    backcolor="White" bordercolor="#3366CC" borderstyle="None" borderwidth="1px" 
                    cellpadding="4" allowpaging="True" width="100%" datakeynames="id" OnSelectedIndexChanged="gvEduLevel_SelectedIndexChanged" OnRowDeleting="gvEduLevel_RowDeleting" >
                    <footerstyle backcolor="#99cccc" forecolor="#003399" />
                    <headerstyle backcolor="#003399" font-bold="true" forecolor="#ccccff" />
                    <pagerstyle backcolor="#99cccc" forecolor="#003399" horizontalalign="left" />
                    <rowstyle backcolor="white" forecolor="#003399" />
                    <selectedrowstyle backcolor="#009999" font-bold="true" forecolor="#ccff99" />
                    <sortedascendingcellstyle backcolor="#edf6f6" />
                    <sortedascendingheaderstyle backcolor="#0d4ac4" />
                    <sorteddescendingcellstyle backcolor="#d6dfdf" />
                    <sorteddescendingheaderstyle backcolor="#002876" />
                    <columns>
                        <asp:CommandField ShowSelectButton="True" HeaderText="<%$Resources:Select%>" SelectText="<%$Resources:Select%>">
                        <HeaderStyle Width="25px" />
                        </asp:CommandField>
                        <asp:CommandField ShowDeleteButton="true" HeaderText="<%$Resources:Delete%>" DeleteText="<%$Resources:Delete%>" >
                        <HeaderStyle Width="25px" />
                        </asp:CommandField>
                        <asp:boundfield datafield="id" headertext="<%$Resources:ID%>" insertvisible="false" readonly="true" sortexpression="id" >
                        <HeaderStyle Width="10px" />
                        </asp:boundfield>
                        <asp:boundfield datafield="name" headertext="<%$Resources:Name%>" sortexpression="name" >
                        <HeaderStyle Width="200px" />
                        </asp:boundfield>
                        <asp:boundfield datafield="shortname" headertext="<%$Resources:ShortName%>" sortexpression="shortname" >
                        <HeaderStyle Width="150px" />
                        </asp:boundfield>
                        <asp:boundfield datafield="note" headertext="<%$Resources:Note%>" sortexpression="note" />
                    </columns>
                </asp:gridview>
                    </div>
                </div>
            </div>
        </div>
    </div>
</asp:Content>